package jd;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

public class LoginOutAction implements Action {
    @Override
    public void execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
        HttpSession session = request.getSession();
        //  销毁session存储的数据
        session.invalidate();
        request.getRequestDispatcher(request.getContextPath() + "index.jsp").forward(request, response);
    }
}
